package com.ywb.edugui.utils;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * 获取ossproperties属性,用于阿里云OSS连接
 */
public class OssUtils {
    public static String ENDPOINT;
    public static String KEY_ID;
    public static String KEY_SECRET;
    public static String BUCKET_NAME;
    static{
        try{
            Properties properties = new Properties();
            InputStream in = OssUtils.class.getClassLoader().getResourceAsStream("ossConstant.properties");
            properties.load(in);
            ENDPOINT = properties.getProperty("endpoint");
            KEY_ID = properties.getProperty("keyId");
            KEY_SECRET = properties.getProperty("keySecret");
            BUCKET_NAME = properties.getProperty("bucketName");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
